package com.camel.core.model;

import com.baomidou.mybatisplus.annotation.*;
import com.camel.core.entity.BasePaginationEntity;
import com.camel.core.enums.EntityStatus;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author baily
 * @since 2019/7/4
 **/
@Data
@TableName("sys_role")
public class SysRole extends BasePaginationEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public static String INTERVIEWER = "interviewer";

    /**
     * 角色ID 主键
     */
    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;
    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 角色标识
     */
    private String roleSign;
    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private List menuIds;

    @TableField(exist = false)
    private List<SysMenu> menus;


    public SysRole() {
    }

    public SysRole(Integer roleId, Integer status) {
        this.roleId = roleId;
        this.status = EntityStatus.NORMAL;
    }

    @Override
    public String toString() {
        return "SysRole{" +
                ", roleId=" + roleId +
                ", roleName=" + roleName +
                ", roleSign=" + roleSign +
                ", remark=" + remark +
                "}";
    }
}
